﻿namespace BM.Tools.WebControls.MForm.Example
{
    using System;
    using System.Web.UI;

    using BM.Tools.WebControls.MForm.Example.Toolbox;

    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        public MFormToolbox ToolboxControl
        {
            get
            {
                return Toolbox;                
            }            
        }

        protected override void OnPreRender(EventArgs e)
        {
            DemonstrationTitle.Text = Page.Title + " - " + "Demonstration";
            DescriptionTitle.Text = Page.Title + " - " + "Description";
            DemonstrationSection.Visible = Demonstration.Controls.Count != 0;
            base.OnPreRender(e);
        }

        public static void HideDescriptionTitle(MasterPage masterPage)
        {
            var site = masterPage as Site;
            site.DescriptionTitle.Visible = false;            
        }
    }
}
